package com.drinkian.business.record.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.drinkian.authentication.entity.po.User;
import com.drinkian.business.good.entity.po.Good;
import com.drinkian.business.room.entity.po.Room;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("trans_record")
public class Record {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Integer type;
    private Long itemId;
    private String price;
    private Long buyerId;
    private Long sellerId;
    private Integer status;
    private Integer buyerDeleted;
    private Integer sellerDeleted;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modifyTime;

    @TableField(exist = false)
    private User buyer;
    @TableField(exist = false)
    private User seller;
    @TableField(exist = false)
    private Good good;
    @TableField(exist = false)
    private Room room;
}
